***Replication code for Ferreira da Silva and Garzia (2024) - Affective polarization towards parties and leaders, and electoral participation in 13 parliamentary democracies, 1980-2019. Public Opinion Quarterly***

*use ...\Ferreira da Silva and Garzia - Replication data_main analysis.dta

gen YEAR_r=YEAR-1980

**#Fig 1*
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 PAP LAP YEAR_r i.COUNTRY
margins, dydx(YEAR_r LAP PAP INTEREST_3 PID_STR EDUCATION GENDER AGE) post
coefplot, aspectratio(.33) xline(0) mcolor(black) ciopts(color(black))

**#Fig 2*
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP##c.YEAR c.LAP##c.YEAR i.COUNTRY
margins, dydx(PAP LAP) at(YEAR=(1980(1)2020))
marginsplot, recast(line) recastci(rarea)

**#Fig 3*
gen DECADE_2=.
replace DECADE_2=0 if YEAR_r<5
replace DECADE_2=1 if YEAR_r>4 & YEAR_r<10
replace DECADE_2=2 if YEAR_r>9 & YEAR_r<15
replace DECADE_2=3 if YEAR_r>14 & YEAR_r<20
replace DECADE_2=4 if YEAR_r>19 & YEAR_r<25
replace DECADE_2=5 if YEAR_r>24 & YEAR_r<30
replace DECADE_2=6 if YEAR_r>29 & YEAR_r<35
replace DECADE_2=7 if YEAR_r>34 & YEAR_r<40

forvalues x = 0/7 {
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 PAP LAP i.COUNTRY c.YEAR if DECADE_2==`x'
margins, dydx(PAP LAP) post
est sto d`x'
}

coefplot d0 || d1 || d2 || d3 || d4 || d5 || d6 || d7, keep(PAP LAP) vertical bycoefs yline(0)


**#SUPPLEMENTARY MATERIALS*

**#Table A2*
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 PAP LAP YEAR_r i.COUNTRY
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP##c.YEAR_r c.LAP##c.YEAR_r i.COUNTRY

**#Figure A1*
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP##i.YEAR c.LAP##i.YEAR i.COUNTRY
coefplot, keep(*.YEAR#*.PAP) vertical yline(0)
coefplot, keep(*.YEAR#*.LAP) vertical yline(0)

**#Figure A2*
*DK
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1994 & COUNTRY==5
est sto DK94
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1998 & COUNTRY==5
est sto DK98
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2001 & COUNTRY==5
est sto DK01
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2005 & COUNTRY==5
est sto DK05
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2007 & COUNTRY==5
est sto DK07
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2011 & COUNTRY==5
est sto DK11
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==5
est sto DK

coefplot DK94 || DK98 || DK01 || DK05 || DK07 || DK11 || DK, keep(PAP LAP) horizontal byopts(imargin(small)) bycoefs mcolor(black) ciopts(lcolor(black)) xline(1) eform saving(DK.gph, replace)

*FI
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2003 & COUNTRY==7
est sto FI03
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2007 & COUNTRY==7
est sto FI07
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2011 & COUNTRY==7
est sto FI11
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==7
est sto FI

coefplot FI03 || FI07 || FI11 || FI, keep(PAP LAP) horizontal byopts(imargin(small)) bycoefs xline(1) eform mcolor(black) ciopts(lcolor(black)) saving(FI.gph, replace)

*DE
logistic TURNOUT AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1980 & COUNTRY==9
est sto DE80
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1983 & COUNTRY==9
est sto DE83
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1987 & COUNTRY==9
est sto DE87
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1990 & COUNTRY==9
est sto DE90
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1994 & COUNTRY==9
est sto DE94
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1998 & COUNTRY==9
est sto DE98
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2002 & COUNTRY==9
est sto DE02
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2005 & COUNTRY==9
est sto DE05
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2009 & COUNTRY==9
est sto DE09
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2013 & COUNTRY==9
est sto DE13
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2017 & COUNTRY==9
est sto DE17
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==9
est sto DE

coefplot DE80 || DE83 || DE87 || DE90 || DE94 || DE98 || DE02 || DE05 || DE09 || DE13 || DE17 || DE, keep(PAP LAP) mcolor(black) xlabel(.8(.2)1.6) ciopts(lcolor(black)) horizontal byopts(imargin(small)) bycoefs xline(1) eform saving(DE.gph, replace)

*EL
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1996 & COUNTRY==10
est sto EL96
logistic TURNOUT AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2009 & COUNTRY==10
est sto EL09
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2012 & COUNTRY==10
est sto EL12
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2015 & COUNTRY==10
est sto EL15
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==10
est sto EL

coefplot EL96 || EL09 || EL12 || EL15 || EL, keep(PAP LAP) horizontal mcolor(black) ciopts(lcolor(black)) byopts(imargin(small)) bycoefs xline(1) eform saving(EL.gph, replace)

*IE
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2002 & COUNTRY==13
est sto IE02
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2007 & COUNTRY==13
est sto IE07
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2016 & COUNTRY==13
est sto IE16
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==13
est sto IE

coefplot IE02 || IE07 || IE16 || IE, keep(PAP LAP) horizontal byopts(imargin(small)) bycoefs xline(1) mcolor(black) ciopts(lcolor(black)) eform saving(IE.gph, replace)

*NL
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1986 & COUNTRY==17
est sto NL86
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1994 & COUNTRY==17
est sto NL94
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1998 & COUNTRY==17
est sto NL98
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2002 & COUNTRY==17
est sto NL02
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2006 & COUNTRY==17
est sto NL06
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2010 & COUNTRY==17
est sto NL10
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2012 & COUNTRY==17
est sto NL12
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2017 & COUNTRY==17
est sto NL17
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==17
est sto NL

coefplot NL86 || NL94 || NL98 || NL02 || NL06 || NL10 || NL12 || NL17 || NL, keep(PAP LAP) horizontal bycoefs byopts(imargin(small)) mcolor(black) ciopts(lcolor(black)) xline(1) eform saving(NL.gph, replace)

*NO
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1981 & COUNTRY==18
est sto NO81
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1985 & COUNTRY==18
est sto NO85
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1989 & COUNTRY==18
est sto NO89
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1993 & COUNTRY==18
est sto NO93
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1997 & COUNTRY==18
est sto NO97
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2001 & COUNTRY==18
est sto NO01
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2005 & COUNTRY==18
est sto NO05
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2009 & COUNTRY==18
est sto NO09
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2013 & COUNTRY==18
est sto NO13
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2017 & COUNTRY==18
est sto NO17
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==18
est sto NO

coefplot NO81 || NO89 || NO93 || NO97 || NO01 || NO05 || NO09 || NO13 || NO17 || NO, keep(PAP LAP) byopts(imargin(small)) horizontal mcolor(black) ciopts(lcolor(black)) bycoefs xline(1) eform saving(NO.gph, replace)

*PT
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2002 & COUNTRY==20
est sto PT02
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2005 & COUNTRY==20
est sto PT05
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2009 & COUNTRY==20
est sto PT09
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2011 & COUNTRY==20
est sto PT11
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2015 & COUNTRY==20
est sto PT15
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2019 & COUNTRY==20
est sto PT19
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==20
est sto PT

coefplot PT02 || PT05 || PT09 || PT11 || PT15 || PT19 || PT, keep(PAP LAP) horizontal mcolor(black) ciopts(lcolor(black)) byopts(imargin(small)) bycoefs xline(1) eform saving(PT.gph, replace)

*SE
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1982 & COUNTRY==25
est sto SE82
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1985 & COUNTRY==25
est sto SE85
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1988 & COUNTRY==25
est sto SE88
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1991 & COUNTRY==25
est sto SE91
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1994 & COUNTRY==25
est sto SE94
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1998 & COUNTRY==25
est sto SE98
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2002 & COUNTRY==25
est sto SE02
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2006 & COUNTRY==25
est sto SE06
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2010 & COUNTRY==25
est sto SE10
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2014 & COUNTRY==25
est sto SE14
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==25
est sto SE

coefplot SE82 || SE88 || SE91 || SE98 || SE02 || SE06 || SE10 || SE14 || SE, keep(PAP LAP) horizontal byopts(imargin(small)) bycoefs mcolor(black) ciopts(lcolor(black)) xline(1) eform saving(SE.gph, replace)

*CH
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1999 & COUNTRY==26
est sto CH99
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2007 & COUNTRY==26
est sto CH07
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2011 & COUNTRY==26
est sto CH11
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==26
est sto CH

coefplot CH99 || CH07 || CH11 || CH, keep(PAP LAP) byopts(imargin(small)) horizontal mcolor(black) ciopts(lcolor(black)) bycoefs xline(1) eform saving(CH.gph, replace)


*UK
logistic TURNOUT AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1983 & COUNTRY==27
est sto UK83
logistic TURNOUT AGE GENDER EDUCATION PID_STR  c.PAP c.LAP if YEAR==1987 & COUNTRY==27
est sto UK87
logistic TURNOUT AGE GENDER EDUCATION PID_STR  c.PAP c.LAP if YEAR==1992 & COUNTRY==27
est sto UK92
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1997 & COUNTRY==27
est sto UK97
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2001 & COUNTRY==27
est sto UK01
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2005 & COUNTRY==27
est sto UK05
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2010 & COUNTRY==27
est sto UK10
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2015 & COUNTRY==27
est sto UK15
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2017 & COUNTRY==27
est sto UK17
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2019 & COUNTRY==27
est sto UK19
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==27
est sto UK 

coefplot UK83 || UK87 || UK92 || UK97 || UK01 || UK05 || UK10 || UK15 || UK17 || UK19 || UK, keep(PAP LAP) horizontal byopts(imargin(small)) xlabel(1(.2)1.4) mcolor(black) ciopts(lcolor(black))bycoefs xline(1) eform saving(UK.gph, replace)


*CA
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1980 & COUNTRY==29
est sto CA80
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1988 & COUNTRY==29
est sto CA88
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1993 & COUNTRY==29
est sto CA93
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==1997 & COUNTRY==29
est sto CA97
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2000 & COUNTRY==29
est sto CA00
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2004 & COUNTRY==29
est sto CA04
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2006 & COUNTRY==29
est sto CA06
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2008 & COUNTRY==29
est sto CA08
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2011 & COUNTRY==29
est sto CA11
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2015 & COUNTRY==29
est sto CA15
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP if YEAR==2019 & COUNTRY==29
est sto CA19
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.LAP i.YEAR if COUNTRY==29
est sto CA

coefplot CA80 || CA88 || CA93 || CA97 || CA00 || CA04 || CA06 || CA08 || CA11 || CA15 || CA19 || CA, keep(PAP LAP) byopts(imargin(small)) xlabel(.8(.2)1.6)  mcolor(black) ciopts(lcolor(black)) horizontal bycoefs xline(1) eform saving(CA.gph, replace)

graph combine DK.gph FI.gph DE.gph EL.gph IE.gph NL.gph NO.gph PT.gph SE.gph CH.gph UK.gph CA.gph, cols(3)

**#Table A3*
reg TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 PAP LAP YEAR i.COUNTRY
estat vif

**#Table A4*
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP c.YEAR_r i.COUNTRY 
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.LAP c.YEAR_r i.COUNTRY 
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP##c.YEAR_r i.COUNTRY 
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.LAP##c.YEAR_r i.COUNTRY 

**#Figure A3*

logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.LAP##c.YEAR i.COUNTRY 
margins, dydx(LAP) at(YEAR=(1980(1)2020)) saving(LAP, replace)
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP##c.YEAR i.COUNTRY 
margins, dydx(PAP) at(YEAR=(1980(1)2020)) saving(PAP, replace)
combomarginsplot PAP LAP , recast(line) recastci(rarea)

**#Table A5*
egen LR_SPREAD=rowsd(LR_PARTY_*)

logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 LR_SELF LR_SPREAD PAP LAP c.YEAR_r i.COUNTRY
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 LR_SELF LR_SPREAD c.PAP##c.YEAR_r c.LAP##c.YEAR_r i.COUNTRY

**#Table A6*
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 PAP LAP YEAR_r i.COUNTRY if COUNTRY==9 | COUNTRY==17 | COUNTRY==18 | COUNTRY==25 | COUNTRY==27 | COUNTRY==29
logit TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP##c.YEAR_r c.LAP##c.YEAR_r i.COUNTRY if COUNTRY==9 | COUNTRY==17 | COUNTRY==18 | COUNTRY==25 | COUNTRY==27 | COUNTRY==29

**#Figure A4**

logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 c.PAP##c.YEAR c.LAP##c.YEAR i.COUNTRY if COUNTRY==9 | COUNTRY==17 | COUNTRY==18 | COUNTRY==25 | COUNTRY==27 | COUNTRY==29
margins, dydx(PAP LAP) at(YEAR=(1980(1)2020))
marginsplot, recast(line) recastci(rarea)

**#Figure A5**
forvalues x = 0/7 {
preserve
keep if COUNTRY==9 | COUNTRY==17 | COUNTRY==18 | COUNTRY==25 | COUNTRY==27 | COUNTRY==29
logistic TURNOUT AGE GENDER EDUCATION PID_STR INTEREST_3 PAP LAP i.COUNTRY c.YEAR if DECADE_2==`x'
margins, dydx(PAP LAP) post
est sto d`x'
restore
}

coefplot d0 || d1 || d2 || d3 || d4 || d5 || d6 || d7, keep(PAP LAP) vertical bycoefs yline(0)

**#*Figure A6**

*use "...\Ferreira da Silva and Garzia - Replication data_FigA6.dta"

logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1981 & COUNTRY==18
est sto NO81
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1985 & COUNTRY==18
est sto NO85
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1989 & COUNTRY==18
est sto NO89
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1997 & COUNTRY==18
est sto NO97
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2001 & COUNTRY==18
est sto NO01
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2005 & COUNTRY==18
est sto NO05
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2009 & COUNTRY==18
est sto NO09
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2013 & COUNTRY==18
est sto NO13
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2017 & COUNTRY==18
est sto NO17
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP i.YEAR if COUNTRY==18
est sto NO

coefplot NO81 || NO85 || NO89 || NO97 || NO01 || NO05 || NO09 || NO13 || NO17 || NO, keep(PAP LAP) horizontal bycoefs xline(1) eform saving(NO_val.gph, replace)

logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1997 & COUNTRY==27
est sto UK97
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2001 & COUNTRY==27
est sto UK01
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2005 & COUNTRY==27
est sto UK05
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2010 & COUNTRY==27
est sto UK10
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2015 & COUNTRY==27
est sto UK15
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2017 & COUNTRY==27
est sto UK17
logistic TURNOUT AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2019 & COUNTRY==27 [iweight=wt_vote]
est sto UK19
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP i.YEAR if COUNTRY==27
est sto UK

coefplot UK97 || UK01 || UK05 || UK10 || UK15 || UK17 || UK19 || UK, keep(PAP LAP) horizontal bycoefs xline(1) eform saving(UK_val.gph, replace)

logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1982 & COUNTRY==25
est sto SE82
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1985 & COUNTRY==25
est sto SE85 
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1988 & COUNTRY==25
est sto SE88 
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1991 & COUNTRY==25
est sto SE91
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1994 & COUNTRY==25
est sto SE94
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==1998 & COUNTRY==25
est sto SE98
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2002 & COUNTRY==25
est sto SE02
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2006 & COUNTRY==25
est sto SE06
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2010 & COUNTRY==25
est sto SE10
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP if YEAR==2014 & COUNTRY==25
est sto SE14
logistic TURNOUT_VAL AGE GENDER EDUCATION PID_STR c.PAP c.LAP i.YEAR if COUNTRY==25
est sto SE

coefplot SE82 || SE85 || SE88 || SE91 || SE94 || SE98 || SE02 || SE06 || SE10 || SE14 || SE, keep(PAP LAP) horizontal bycoefs xline(1) eform saving(SE_val.gph, replace)


graph combine NO_val.gph SE_val.gph UK_val.gph, cols(1) 